@import '../../scssMixin/generateClassName2.module.scss';
@import '../../scss/vars.module.scss';
$--line-hor-w: 30px;
$--line-color: #a79f9f;
$--margin-bottom: 16px;
$--padding-left: 8px;
$--mix-light-color: #ffffff;
@include z('tree-root') {
    border: 1px solid $border-color-base;
    border-radius: 4px;
    padding: 16px;
}
@include z('tree-type') {
    margin-bottom: $--margin-bottom/2;
}
@include z('option-group') {
    padding-left: $--line-hor-w;
    border-left: 1px dashed $--line-color;
}
@include z('option-item') {
    line-height: normal;
    position: relative;
    padding: $--margin-bottom/2 $--padding-left;
    left: -$--padding-left;
    // margin:0 -$--padding-left;
    &:hover {
        background-color: #f0faff;
    }
    &::after {
        content: '';
        display: block;
        width: $--line-hor-w;
        border-top: 1px dotted $--line-color;
        position: absolute;
        top: 50%;
        transform: translate(0, -50%);
        left: -($--line-hor-w - $--padding-left);
        z-index: 1;
    }
    &.first-item {
        &::before {
            content: '';
            display: block;
            width: $--line-hor-w + 1;
            border-left: 1px dashed $--line-color;
            position: absolute;
            height: $--margin-bottom / 2;
            left: -($--line-hor-w + 1 - $--padding-left);
            top: -($--margin-bottom / 2);
        }
    }
}
:global {
    $--border-hover-color: mix($primary-color, $--mix-light-color, 30%);
    $--item-default: 20px;
    .z-option-btn-item {
        border-radius: 4px;
        margin-left: 6px;
        border: 1px dashed $--border-hover-color;
        height: $--item-default;
        width: $--item-default;
        text-align: center;
        line-height: $--item-default;
        cursor: pointer;
        display: inline-block;
        font-size: 12px;
        color: darken($--border-hover-color, 20%);
        background-color: white;
        &:hover {
            background-color: mix($--border-hover-color, $--mix-light-color, 20%);
        }

        $--delete-color: #f48cc5;
        &.delete {
            border-color: $--delete-color;
            color: darken($--delete-color, 20%);
            &:hover {
                background-color: mix($--delete-color, $--mix-light-color, 20%);
            }
        }
        $--remove-color: #83ced8;
        &.move {
            border-color: $--remove-color;
            color: darken($--remove-color, 20%);
            &:hover {
                background-color: mix($--remove-color, $--mix-light-color, 20%);
            }
        }
    }
}
@include z('add-siblings') {
    margin-left: 0 !important;
    position: absolute;
    left: $--padding-left - 4;
    transform: translate(-100%, -50%);
    top: 50%;
    cursor: pointer;
    z-index: 2;
}
